@extends('layouts.admin')
@section('content')
	<style>
		.btn-group{
			margin-left:20px;
			line-height:40px;
		}
		.radio{
			margin-left:200px;
			line-height:40px;
		}
		.controls img{
			height:80px;
			width:100px;
		}
	</style>
		<div id="content-header">
			<h1>Form wizard</h1>
			<div class="btn-group">
				<a class="btn btn-large tip-bottom" title="Manage Files"><i class="icon-file"></i></a>
				<a class="btn btn-large tip-bottom" title="Manage Users"><i class="icon-user"></i></a>
				<a class="btn btn-large tip-bottom" title="Manage Comments"><i class="icon-comment"></i><span class="label label-important">5</span></a>
				<a class="btn btn-large tip-bottom" title="Manage Orders"><i class="icon-shopping-cart"></i></a>
			</div>
		</div>
		<div id="breadcrumb">
			<a href="#" title="Go to Home" class="tip-bottom"><i class="icon-home"></i> Home</a>
			<a href="#">Form elements</a>
			<a href="#" class="current">Form wizard</a>
		</div>
		<div class="container-fluid">
			<div class="row-fluid">
				<div class="span12">
					<div class="widget-box">
						<div class="widget-title">
								<span class="icon">
									<i class="icon-pencil"></i>
								</span>
							<h5>编辑单品</h5>
						</div>
						<div class="widget-content nopadding">
							@if (count($errors) > 0)
								@foreach ($errors->all() as $error)
									<div style="background: pink;color:darkred;text-align:center;">
										{{ $error }}
									</div>
								@endforeach
							@endif
							@foreach($Lianggoods as $liang)
							<form action="{{url('admin/LianggoodsEditData')}}/{{$page}}{{$search == '' ? '' : '/'.$search}}" id="form-wizard" class="form-horizontal" method="post" enctype="multipart/form-data"/>
							{{csrf_field()}}
								<input type="hidden" name="id" value="{{$liang['id']}}">
							<div id="form-wizard-1" class="step">
								<div class="control-group">
									<label class="control-label">商品名称</label>
									<div class="controls">
										<input id="catename" type="text" name="name" value="{{$liang['name']}}" />
									</div>
								</div>
								<div class="control-group">
									<label class="control-label">商品图片</label>
									<div class="controls">
										{{--<img src="{{asset('adminpublic').'/'.$Sing['pic']}}" alt="">--}}
										<input type="file" name="pic">
									</div>
								</div>
								<div class="control-group">
									<label class="control-label">选择分类</label>
									<div class="btn-group">
										<select class="form-control" name="categoods_id">
											<option value=0>顶级分类</option>>
											@foreach($LiangEdit as $edit)
											<option value="{{$edit['id']}}">{{str_repeat('&nbsp;', $edit['count'] * 8).'|--'.$edit['name']}}</option>
											@endforeach
										</select>
									</div>
								</div>
								<div class="control-group">
									<label class="control-label">商品描述</label>
									<div class="controls">
										<input id="describe" type="text" name="describe" value="{{$liang['describe']}}" />
									</div>
								</div>
								<div class="control-group">
									<label class="control-label">商品价格</label>
									<div class="controls">
										<input id="visitor" type="text" name="price" value="{{$liang['price']}}"/>
									</div>
								</div>
								<div class="control-group">
									<label class="control-label">推荐状态</label>
									<div class="radio">
										<label>
											<input type="radio" name="recommend" id="recommend1" value=1 {{$liang['recommend']==1?'checked':''}}>
											推荐
										</label>
									</div>
									<div class="radio">
										<label>
											<input type="radio" name="recommend" id="recommend1" value=2 {{$liang['recommend']==2?'checked':''}}>
											非推荐
										</label>
									</div>
								</div>
								<div class="control-group">
									<label class="control-label">显示状态</label>
									<div class="radio">
										<label>
											<input type="radio" name="disstatus" id="recommend2" value=1 {{$liang['disstatus']==1?'checked':''}}>
											显示
										</label>
									</div>
									<div class="radio">
										<label>
											<input type="radio" name="disstatus" id="recommend2" value=2 {{$liang['disstatus']==2?'checked':''}}>
											隐藏
										</label>
									</div>
								</div>
							</div>
							<div class="form-actions">
								<a href="{{url('admin/LianggoodsList')}}" id="back" class="btn btn-primary" type="reset">返回</a>
								<input id="next" class="btn btn-primary" type="submit" value="修改" />
								<div id="status"></div>
							</div>
							<div id="submitted"></div>
							</form>
							@endforeach
						</div>
					</div>
				</div>




@endsection
